package com.jia.dao;

import com.jia.pojo.Users;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

public interface UsersMapper {
    // 获取全部 xml
    List<Users> getUserList();

    @Select("select * from users")
    List<Users> getUsers();

    @Select("select * from users where id = #{id}")
    Users getUserById(@Param("id") int id);

    @Insert("insert into users values(#{id},#{name},#{pwd})")
    int addUser(Users users);

    @Update("update users set name=#{name},pwd=#{pwd} where id=#{id}")
    int updateUser(Users users);

    @Delete("delete from users where id = #{uid}")
    int deleteUser(@Param("uid") int id);




}
